﻿@if (Cms.CmsContext != null)
{
	<ul id="mainadminmenu">
		<li>@Html.ActionLink("Pages", "Index", "Pages")</li>
		<li>@Html.ActionLink("Navigation", "Index", "Sitemap")</li>
		<li>@Html.ActionLink("Files", "Index", "Files")</li>
		<li>
			@Html.ActionLink("Site", "Index", "Site")
			<span class="expander"><img src="@Cms.Content("Themes/Admin/Images/open.gif")"/></span>
			<ul>
				<li>@Html.ActionLink("Themes", "Index", "Themes")</li>
				<li>@Html.ActionLink("Plugins", "Index", "Plugins")</li>
				<li>@Html.ActionLink("Widgets", "Index", "Widgets")</li>
				<li>@Html.ActionLink("Page layouts", "Index", "Layouts")</li>
			</ul>
		</li>
	</ul>
	<script type="text/javascript">
		$(document).ready(function() {
			$('.expander').click(function(e) {
				e.stopPropagation();
				$(this).next('ul').toggle();
			});

			$(document).click(function() {
				$('.expander').next('ul:visible').toggle();
			});
		});
	</script>
}